home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / lmitool / normopt.sci < prev    next >
Text File  |  1999-09-16  |  1KB  |  34 lines

  1.  function [X,c]=normopt(A,B,C,D)
  2.  // Generated by lmitool on Wed Feb 08 16:17:01 MET 1995
  3.    
  4.    Mbound = 1e3;
  5.    abstol = 1e-10;
  6.    nu = 10;
  7.    maxiters = 100;
  8.    reltol = 1e-10;
  9.    options=[Mbound,abstol,nu,maxiters,reltol];
  10.     
  11.  ///////////DEFINE INITIAL GUESS BELOW
  12.  X_init=eye(A);Ib=eye(B'*B);Ic=eye(C*C');c_init=10;                
  13.  /////////// 
  14.   
  15.  XLIST0=list(X_init,c_init)
  16.  XLIST=lmisolver(XLIST0,normopt_eval,options)
  17.  [X,c]=XLIST(:)
  18.   
  19.   
  20.   
  21.  /////////////////EVALUATION FUNCTION////////////////////////////
  22.   
  23.  function [LME,LMI,OBJ]=normopt_eval(XLIST)
  24.  [X,gamma]=XLIST(:)
  25.   
  26.  /////////////////DEFINE LME, LMI and OBJ BELOW
  27.  LME=X'-X                                                          
  28.  LMI=-[A*X+X*A', B, X*C';
  29.        B', -gamma*Ib, D';
  30.        C*X, D, -gamma*Ic]              
  31.  OBJ=gamma                                                          
  32.                                                                    
  33.                                                                    
  34.